package com.lmds.sprindemo1;

import com.lmds.sprindemo1.aop.CGLibDemo;
import com.lmds.sprindemo1.aop.DemoInterface;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringDemo1Application {

	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(SpringDemo1Application.class, args);
		CGLibDemo cgLibDemo = (CGLibDemo) context.getBean("CGLibDemo");

		cgLibDemo.test();
		cgLibDemo.test2();
		DemoInterface demoInterface = (DemoInterface) cgLibDemo;
		demoInterface.addFunction();
//		context.close();

	}
}
